#ifndef CONF_WRITER_H_
#define CONF_WRITER_H_

#include <stdio.h>
#include <boost/utility.hpp>
#include <glibmm.h>

namespace gpyp {
namespace conf {

class Writer : boost::noncopyable {
private:
  FILE  *file_;
  size_t depth_;

public:
  bool open(const std::string &file_path);
  void close();

  void indent();
  void write(const Glib::ustring &data, bool escape = false);
  void write_attribute(const Glib::ustring &name,
                       const Glib::ustring &value);
  void new_line();
  void push();
  void pop();

  Writer();
  virtual ~Writer();
};

}/*conf*/
}/*gpyp*/

#endif/*CONF_WRITER_H_*/
